package com.catering.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.catering.pojo.DVoucher;
import com.catering.service.DVoucherService;
import com.catering.mapper.DVoucherMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 徐
* @description 针对表【d_voucher】的数据库操作Service实现
* @createDate 2025-04-08 19:03:27
*/
@Service
public class DVoucherServiceImpl extends ServiceImpl<DVoucherMapper, DVoucher>
    implements DVoucherService{
    @Autowired
    private DVoucherMapper dVoucherMapper;

    @Override
    public List<DVoucher> selectByDVoucher(Integer uid) {
        List<DVoucher> dVouchers = dVoucherMapper.selectByDVoucher(uid);
        return dVouchers;
    }

    @Override
    public List<DVoucher> selectByEffective() {
        List<DVoucher> dVouchers = dVoucherMapper.selectByEffective();
        return dVouchers;
    }

    @Override
    public void updateByEffective(Integer uid, Integer vid) {
        dVoucherMapper.updateByEffective(uid,vid);
    }

    @Override
    public void updateByEffective1(Integer vid) {
        dVoucherMapper.updateByEffective1(vid);
    }
}




